package day04;

import java.util.Arrays;

public class test10 {
    public static void main(String[] args) {
        int[] arr = new int[10];
        int n = arr.length;
        for (int i = 0; i < n; i++) {
            arr[i] = (int) (Math.random() * 100 + 1);
        }
        System.out.println(Arrays.toString(arr));

        int temp = 0;
        for (int j = 0; j < n - 1; j++) {
            for (int i = j + 1; i < n; i++) {
                if (arr[j] > arr[i]) {
                    temp = arr[i];
                    arr[i] = arr[j];
                    arr[j] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));

    }
}
